html,
body {
  font-family: -apple-system, "BlinkMacSystemFont", sans-serif;
  margin: 0;
  background-color: aliceblue;
  scroll-behavior: smooth;
}
body {
  padding: 0 15px;
}
nav {
  position: fixed;
  top: 15px;
  right: 15px;
  background: #fff;
  padding: 10px 0;
  border-radius: 4px;
  overflow: hidden;
  a {
    position: relative;
    display: block;
    line-height: 2;
    padding: 0 15px;
    font-size: 14px;
    color: #191919;
    text-decoration: none;
    animation: active;
    animation-timeline: var(--s);
    border-left: 4px solid transparent;
    &:hover {
      background-color: #d5d5d54a;
    }
  }
}
.content {
  view-timeline-name: var(--s);
  view-timeline-inset: 80% 20%;
  h2 {
    margin: 0;
    padding: 0.8em 0;
    scroll-margin: 20px;
  }
  div {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    span {
      width: 30%;
      height: 100px;
      border-radius: 4px;
      background-color: #e4ccff;
    }
  }
}

@keyframes active {
  0%,
  100% {
    color: #6f00ff;
    border-color: #6f00ff;
  }
}
